import request from "@/utils/request";
import requestMd5 from "@/utils/requestMd5";

export function member_index(params) {
  return request({
    url: "/member/index",
    method: "get",
    params
  });
}

export function member_add(data) {
  return request({
    url: "/member/add",
    method: "post",
    data: data
  });
}

export function member_edit(data) {
  return request({
    url: "/member/edit",
    method: "post",
    data: data
  });
}

export function member_delete(data) {
  return request({
    url: "/member/delete",
    method: "post",
    data: data
  });
}

export function member_base(params) {
  return request({
    url: "/member/base",
    method: "get",
    params
  });
}

export function member_generateCode(data) {
  return request({
    url: "/member/generateCode",
    method: "post",
    data: data
  });
}

export function member_info(params) {
  return request({
    url: "/member/info",
    method: "get",
    params
  });
}

export function member_accountPeriod(params) {
  return request({
    url: "/member/accountPeriod",
    method: "get",
    params
  });
}

export function member_saveAccountPeriod(data) {
  return request({
    url: "/member/saveAccountPeriod",
    method: "post",
    data: data
  });
}

export function member_invoice(params) {
  return request({
    url: "/member/invoice",
    method: "get",
    params
  });
}

export function member_saveInvoice(data) {
  return request({
    url: "/member/saveInvoice",
    method: "post",
    data: data
  });
}

export function member_subAccount(params) {
  return request({
    url: "/member/subAccount",
    method: "get",
    params
  });
}

// 用户列表导出----列表
export function user_export(data) {
  return request({
    url: "/export/user_export",
    method: "post",
    responseType: "blob",
    data: data
  });
}

/* 订单导入---开始 */
export function user_import_model(params) {
  return request({
    url: "/export/user_import_model",
    method: "post",
    responseType: "blob",
    params
  });
}

// 常用商品
export function commonly_goods(data) {
  return requestMd5({
    url: "/member/commonly_goods",
    method: "post",
    data: data
  });
}


// 常用商品导出
export function export_common_goods(params) {
  return requestMd5({
    url: "/member/export_distinguish",
    method: "post",
    responseType: "blob",
    params
  });
}